﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Yeap.Kernel.Utils.Enums;

namespace Yeap.Kernel.Utils
{
    public static class ConvertUtility
    {
        public static String WorkTypeToString(this WorkTypes workType)
        {
            switch (workType)
            {
                case WorkTypes.Available:
                    return "Доступна";
                case WorkTypes.Completed:
                    return "Завершена";
                case WorkTypes.InProgress:
                    return "Выполняется";
                case WorkTypes.PastYears:
                    return "Работа прошлых лет";
                case WorkTypes.None:
                    return String.Empty;
                default:
                    throw new NotSupportedException("Unknown workType");
            }
        }

        public static String AssignmentTypeToString (this AssignmentTypes assignmentType)
        {
            switch (assignmentType)
            {
                case AssignmentTypes.StudentProposal:
                    return "Подал заявку";
                case AssignmentTypes.ProfessorProposal:
                    return "Приглашён преподавателем";
                case AssignmentTypes.Agreement:
                    return "Выполняет";
                case AssignmentTypes.Finished:
                    return "Работа закончена";
                default:
                    throw new NotSupportedException("Unknown assignment type");
            }
        }
    }
}